package com.mf.pte.selection;

import com.ptc.cipjava.intseq;
import com.ptc.cipjava.jxthrowable;
import com.ptc.pfc.pfcAssembly.Assembly;
import com.ptc.pfc.pfcAssembly.ComponentPath;
import com.ptc.pfc.pfcAssembly.pfcAssembly;
import com.ptc.pfc.pfcCommand.DefaultUICommandActionListener;
import com.ptc.pfc.pfcModel.Model;
import com.ptc.pfc.pfcSelect.Selection;
import com.ptc.pfc.pfcSelect.pfcSelect;
import com.ptc.pfc.pfcSession.Session;
import com.ptc.wfc.wfcSession.WSession;

import static com.ptc.pfc.pfcBase.StdColor.COLOR_HIGHLIGHT;

public class NestedHighlight extends DefaultUICommandActionListener {
    private Session session;
    private WSession wSession;

    public NestedHighlight(Session session, WSession wSession) {
        this.session = session;
        this.wSession = wSession;
    }
    @Override
    public void OnCommand() throws jxthrowable {
        Model model = session.GetCurrentModel();
        Assembly assembly = (Assembly) model;
        intseq path = intseq.create();
        path.append(40);
        path.append(43);
        ComponentPath componentPath = pfcAssembly.CreateComponentPath(assembly, path);
        Selection selection = pfcSelect.CreateComponentSelection(componentPath);
        selection.Highlight(COLOR_HIGHLIGHT);
    }
}
